//
//  CartBean.swift
//  ShopIOS
//
//  Created by Apple on 2019/7/20.
//  Copyright © 2019 Apple. All rights reserved.
//

import Foundation
import SwiftyJSON
class CartShop {
    var Success:String?
    var Shop:[[CartBean]]?
    init(json:JSON) {
        Success = json["Success"].stringValue
        Shop = json["Shop"].arrayValue.compactMap({ (json
            ) -> [CartBean]? in
            return json.arrayValue.compactMap({CartBean(json: $0)})
        })
    }
}
class ShopBean {
    var isSelected:Bool = false          /* 记录相应row是否选中（自定义）*/
    var Shop:[CartBean]
    init(Shop:[CartBean]) {
        self.Shop=Shop
    }
}
class CartBean {
    var isSelected:Bool = false          /* 记录相应row是否选中（自定义）*/
    var SkuId: String?
    var Url: String?
    var Size: String?
    var Status: Int = 0
    var Price: Double!
    var ColorAlias: String?
    var ShopId: String?
    var SizeAlias: String?
    var ShopBranchName: String?
    var VersionAlias: String?
    var Color: String?
    var Name: String?
    var ImgUrl: String?
    var ShopName: String?
    var Version: String?
    var ShopLogo: String?
    var CartItemId: String?
    var AddTime: String?
    var Count: Int!
    var ShopBranchLogo: String?
    var ShopBranchId: Int = 0
    var Id: String?
    var VShopId: String?
    
    init(json: JSON) {
        SkuId = json["SkuId"].stringValue
        Url = json["Url"].stringValue
        Size = json["Size"].stringValue
        Status = json["Status"].intValue
        Price = json["Price"].doubleValue
        ColorAlias = json["ColorAlias"].stringValue
        ShopId = json["ShopId"].stringValue
        SizeAlias = json["SizeAlias"].stringValue
        ShopBranchName = json["ShopBranchName"].stringValue
        VersionAlias = json["VersionAlias"].stringValue
        Color = json["Color"].stringValue
        Name = json["Name"].stringValue
        ImgUrl = json["ImgUrl"].stringValue
        ShopName = json["ShopName"].stringValue
        Version = json["Version"].stringValue
        ShopLogo = json["ShopLogo"].stringValue
        CartItemId = json["CartItemId"].stringValue
        AddTime = json["AddTime"].stringValue
        Count = json["Count"].intValue
        ShopBranchLogo = json["ShopBranchLogo"].stringValue
        ShopBranchId = json["ShopBranchId"].intValue
        Id = json["Id"].stringValue
        VShopId = json["VShopId"].stringValue
    }
}

